/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       adv_garrison.h

	$Header: /game/adv_garrison.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( ADV_GARRISON_H_INCLUDED )
#define ADV_GARRISON_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ownable_garrisonable_adv_object.h"

// ---------------------------------------------------------------
// garrison adventure object
// ---------------------------------------------------------------
class t_adv_garrison : public t_ownable_garrisonable_adv_object
{
public:

    t_adv_garrison(  std::string const& source );

	virtual float					ai_activation_value_drop( t_creature_array const& army ) const;
	virtual float					ai_value( t_adventure_ai const& ai, t_creature_array const& army, int move_cost ) const;	

	virtual void					activate_trigger( t_army*					army, 
													  t_adv_map_point const&	point, 
													  t_direction				direction, 
													  t_adventure_frame*		frame );
	virtual bool					blocks_army( t_creature_array const&	army,
												 t_path_search_type			path_type ) const;
	virtual t_town_image_level		get_castle_level() const;
    virtual t_bitmap_cursor const&	get_cursor( t_adventure_map_window const& window,
		                                        t_army const*				  army ) const;
	virtual int						get_version() const;
	virtual bool					is_triggered_by( t_creature_array const& army ) const;
	virtual void			        left_double_click( t_mouse_event const& event, 
							                   t_adventure_frame* adventure_frame );
	virtual void					on_combat_end( t_army* attacker, t_combat_result result,
												   t_creature_array* losses, 
												   t_adventure_frame* frame );
	virtual bool					read( std::streambuf&						stream, 
										  t_qualified_adv_object_type const&	type,
										  int									version );
	virtual void					right_click( t_mouse_event const& event,
												 t_adventure_frame* adventure_frame );
	virtual bool                    write( std::streambuf& stream ) const;
private:
	void visit( t_army* army, t_adventure_frame* frame );

};

inline t_adv_garrison::t_adv_garrison(  std::string const& source )
	:	t_ownable_garrisonable_adv_object( source )
{
}

#endif // !defined( ADV_GARRISON_H_INCLUDED )
